
package cc.dd.marketing.api.constant;

import lombok.Getter;

/**
 * 活动枚举
 *
 * @author dongsufeng
 * @date 2022/9/9 11:19 AM
 */
@Getter
public enum ActivityTypeEnum {
    P_PULL_P("100001", "人拉人",1000000L,false),
    ;

    ActivityTypeEnum(String code, String desc,Long participationTimes,Boolean putReward) {
        this.code = code;
        this.desc = desc;
        this.participationTimes = participationTimes;
        this.putReward = putReward;
    }

    private String code;

    private String desc;
    /**
     * 预计参与次数
     */
    private Long participationTimes;
    /**
     * 是否直接发奖励
     */
    private Boolean putReward;


    public static ActivityTypeEnum getByCode(String code){
        for (ActivityTypeEnum value : ActivityTypeEnum.values()) {
            if (value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
